1. Field of the Invention
The present invention relates to an application of an adaptive band-pass or low-pass filter, and more particularly, to an apparatus and method for controlling focus using an adaptive filter in, for example, a camcorder.
2. Description of Related Art
In general, an automatic focus control method used for an electronic zoom system of a digital video camera or a camcorder is either an active type or a passive type. In an active automatic focus control method, focus is controlled by calculating the distance between the lens and the subject using an infrared or ultrasonic wave reflected from the subject. In a passive automatic focus control method, focus is adjusted based on the image signal received through the lens.
In the passive automatic focus control method, an image received through the lens is modeled as an image which has passed through a Gaussian low-pass filter. A summation of high-frequency components such as the edge of the modeled image is used as a reference for determining the focus. The image having the largest focus value is defined as the image having the best adjusted focus. However, an unexpected result can be caused by noise in the image obtained under various circumstances. Namely, noise having a high-frequency component affects the focus value for controlling the focus. It would be desirable to reduce the noise having high-frequency components in the low-frequency area of the image, while preserving the high-frequency components such as the edge.
FIGS. 1 and 2 contain focus curves, i.e., plots of focus measure versus focus position, for two conventional passive automatic focus control methods. FIG. 1 shows a focus curve obtained by a sum modified Laplacian (SML) method. FIG. 2 shows a focus curve obtained by a sum modulus difference (SMD) method.
An SML method entitled xe2x80x9cShape from Focus,xe2x80x9d mentioned at page 827 of IEEE Transactions on Pattern Analysis and Machine Intelligence, VOL. 16, No. 8, published on August 1994 by Shree K. Nayar and Yasuo Nakagawa, is a conventional passive automatic focus controlling method. In the SML method, an absolute value of a secondary differential value of a horizontal and vertical direction by using reformed Laplacian filter is used as a focus value. Accordingly, the SML method has the characteristics shown in FIG. 1.
A sum modulus difference (SMD) method entitled xe2x80x9cFocus Optimisation Criteria for Computer Image Processing,xe2x80x9d mentioned at page 166 of xe2x80x9cMicroscopexe2x80x9d magazine published in 1976 by R. A. Jarvis, is another conventional passive automatic focus control method. In this method, differences between horizontally and vertically adjacent pixel values of an image are obtained and accumulated. The accumulated results in thy respective directions are added. The added value is used as the focus value. Accordingly, the method has the characteristic shown in FIG. 2.
Focus curves such as those shown in FIGS. 1 and 2 can be used to evaluate performance of automatic focus control methods. In analyzing such curves, it is typically noted whether a focus curve has a slope over the entire range of focus positions and whether the slope of the focus curve is steep near the maximum focus measure.
Also, the slope of the focus curve must not change from positive (+) to negative (xe2x88x92) or from negative (xe2x88x92) to positive (+) in focus positions other than the focus position of the maximum focus measure. That is, it is desirable that no local maximum focus measure, i.e., change of slope sign, exists. However, in the above-mentioned passive automatic focus control methods, local maxima can exist because the characteristics of each image vary due to noise and, as a result, ideal images are not input.
Also, these conventional passive automatic focus control methods require extensive processing memory. For example, at least three line memories are required as hardware for the above-mentioned SML method. Also, at least one line memory is required for the SMD method.
It is an object of the present invention to provide a focus control apparatus using an adaptive filter, for accurately providing a focus value required for controlling the focus by reducing high-frequency noise in a low-frequency component of an image, while preserving and enhancing an edge or a detailed portion of the image. In one aspect of the invention, the adaptive filter is an adaptive band-pass filter or an adaptive low-pass filter.
It is another object of the present invention to provide a focus control method performed by the focus control apparatus, using an adaptive filter.
Accordingly, the present invention provides a focus control apparatus using an adaptive filter for determining a focus value used for controlling the focus of a lens. In one embodiment, the apparatus of the invention comprises adaptive low-pass filtering means for covering an image signal captured through the lens with a mask of a predetermined size. The adaptive low-pass filtering means compares brightness level differences between a central pixel located in the center of the mask and pixels adjacent to the central pixel with a threshold value, multiplies a weight calculated in response to the comparison result by the brightness level of a concerned pixel in the mask. The adaptive low-pass filtering means adds together the multiplication results of all the pixels, and outputs the sum as an adaptively low-pass filtered image signal. The apparatus of the invention also includes a high-pass filter for filtering a high-frequency component of the adaptively low-pass filtered image signal, absolute value calculating means for calculating the absolute values of the image signal in which the high-frequency component is filtered, and accumulating means for accumulating the absolute values and outputting the accumulated value as the focus value of the captured image signal.
In another embodiment, a focus control apparatus in accordance with the invention using an adaptive filter for determining a focus value used for controlling the focus of a lens comprises adaptive band-pass filtering means for covering an image signal captured through the lens with a mask of a predetermined size. The adaptive band-pass filtering means compares brightness level differences between a central pixel located in the center of the mask and pixels adjacent to the central pixel with first, second, and third threshold values. It multiplies the sum of first and second weights, calculated in response to the comparison results, by the brightness level of a concerned pixel in the mask. The multiplication results for all the pixels are added, and the resulting sum is output as an adaptively band-pass filtered image signal. The apparatus of the invention also includes a high-pass filter for filtering the high-frequency component of the adaptively band-pass filtered image signal, absolute value calculating means for calculating the absolute values of the image signal in which the high-frequency component is filtered, and accumulating means for accumulating the absolute values and outputting the accumulated value as the focus value of the captured image signal.
In one embodiment, the focus control method of the invention, using an adaptive filter for determining a focus value used to control the focus of a lens, comprises the steps of (a) obtaining an adaptively low-pass filtered image signal by sequentially covering the image signal captured through the lens with a mask of a predetermined size, comparing brightness level differences between a central pixel located in the center of the mask and pixels adjacent to the central pixel with a threshold value, multiplying a weight calculated corresponding to the comparison result by the brightness level of a concerned pixel in the mask, and adding the multiplication results for all pixels, (b) filtering the high-frequency component of the adaptively low-pass filtered image signal, (c) obtaining the absolute values of the image signal in which the high-frequency component is filtered, and (d) determining the focus value of the captured image signal by accumulating the absolute values.
In another embodiment, the focus controlling method of the invention using an adaptive filter for determining a focus value used to control the focus of a lens, comprises the steps of (a) sequentially covering the image signal captured through the lens with a mask of a predetermined size, comparing brightness level differences between a central pixel located in the center of the mask and pixels adjacent to the central pixel with first, second, and third threshold values, multiplying the sum of first and second weights calculated according to the comparison results by the brightness level of the concerned pixel, and obtaining an adaptively band-pass filtered image signal by accumulating the multiplication results, (b) filtering the high-frequency component of the adaptively band-pass filtered image signal, (c) obtaining the absolute value of the image signal in which the high-frequency component is filtered, and (d) determining the focus value of the captured image signal by accumulating the absolute values.